package com.test.study.ToolsUtils.strom.trident;

import org.apache.storm.trident.operation.BaseFilter;
import org.apache.storm.trident.tuple.TridentTuple;
/**
 * 跳过指定的数据
 * @author huyong
 *
 */
public class MyTridentFilter extends BaseFilter {
	private static final long serialVersionUID = 577452085837944660L;

	@Override
	public boolean isKeep(TridentTuple tuple) {//如果返回值为false就过滤掉
		Integer integer = tuple.getInteger(0);
		if(integer%2==0) {
			return true;
		}
		return false;
	}

}
